/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.bht.esa.weather.model;

import de.bht.esa.weather.model.geo.GeoBounds;
import de.bht.esa.weather.model.geo.GeoCoordinates;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * Repräsentiert einen Ort
 * 
 * @author Andreas Goese
 * @author Sven Höche
 */
@XmlRootElement
public class Location implements Serializable{
    private static final long serialVersionUID = 1234567891280000001L;
    
    private String name; //Ortsname
    private String zip; //Postleitzahl
    private String country; //Land
    private String state; //Bundesland
    private String county; //Landkreis
    private String address; //Straße + Hausnummer
    private String district; //Stadtteil
    private GeoCoordinates center;
    private GeoBounds bounds;

    public GeoCoordinates getCenter() {
        return center;
    }

    public void setCenter(GeoCoordinates center) {
        this.center = center;
    }

    public GeoBounds getBounds() {
        return bounds;
    }

    public void setBounds(GeoBounds bounds) {
        this.bounds = bounds;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getZip() {
        return zip;
    }

    public void setZip(String zip) {
        this.zip = zip;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
    
    public String toString(){
        String value = "";
        if(this.getCountry() != null){
            value += this.getCountry() + " ";
        }
        if(this.getName() != null){
            value += this.getName() + " ";
        }
        if(this.getZip() != null){
            value += this.getZip() + " ";
        }
        if(this.getState() != null){
            value += this.getState() + " ";
        }
        /*if(this.getCounty() != null){
            value += this.getCounty() + " ";
        }
        if(this.getDistrict() != null){
            value += this.getDistrict();
        }*/
        return value;
    }
}
